
let htmlEle = document.documentElement;

function setRemUnit() {
  let htmlWidth = htmlEle.clientWidth; // 得到屏幕大小

  let htmlFs = htmlWidth / 10;

  htmlEle.style.fontSize = htmlFs + "px"
}


setRemUnit();

window.addEventListener("resize", setRemUnit)